{% load twitcn_filters %}

{% for user in users %}

<tr class="user following direct-messageable even" id="user_{{ user.id }}">
  <td class="thumb vcard">
    <a hreflang="en" href="{{ ROOT_PATH }}/{{ user.screen_name }}/">
      <img title="{{ user.description }}" alt="{{ user.name }}" width="48" height="48" border="0" style="vertical-align: middle;" src="{{ user.profile_image_url }}"/>
    </a>
  </td>
          
  <td class="user-detail">
    <address class="about vcard">
      <span class="label screenname"><a href="{{ ROOT_PATH }}/{{ user.screen_name }}/">{{ user.screen_name }}</a></span><br/>
    
      <span>
        <span class="label fullname">{{ user.name }}</span>
        <span class="location"> | {{ user.location }}</span>
      </span><br/>

      <span>
        Friends: {{ user.friends_count }},
        Followers: {{ user.followers_count }}<br/>
        Tweets: {{ user.statuses_count }}
        ( {{ user.tweet_rate }} per day )
      </span>
    </address>

    <br/>
    
    <span class="user-body">
      <span class="currently"> {{ user.status.text|ParseStatusText|safe }}  <em>{{ user.status.relative_created_at }}</em></span>
    </span>
  </td>
  
  <td class="user-actions-outer">
  {% if user.following %}
    <button onclick="javascript:unfollow_user('{{ user.screen_name }}');return false;" id="follow-user-{{ user.screen_name }}" class="btn">Unfollow</button>
  {% else %}
    <button onclick="javascript:follow_user('{{ user.screen_name }}');return false;" id="follow-user-{{ user.screen_name }}" class="btn">Follow</button>
  {% endif %}
  </td>
</tr>

{% endfor %}
